In [1]:
import copy
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import os
import seaborn as sns
import time
import warnings

import scipy.ndimage.filters
import scipy.stats as stats

from IPython.display import display, clear_output

import nelpy as nel
import nelpy.plotting as npl

from nelpy.analysis.hmm_sparsity import HMMSurrogate

from sklearn.model_selection import train_test_split
from mpl_toolkits.axes_grid1 import make_axes_locatable

from nelpy import hmmutils
from nelpy.decoding import k_fold_cross_validation
from nelpy.decoding import decode1D

# Set default figure aesthetics
npl.setup(font_scale=2.0)

%matplotlib inline

warnings.filterwarnings("ignore")


/opt/conda/lib/python3.6/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.

In [2]:
import gcsfs
import pandas as pd
import os

load_local = False

if not load_local:
    fs = gcsfs.GCSFileSystem(project='polar-program-784', token='cloud')
    print(fs.ls('kemerelab-data/diba'))

    with fs.open('kemerelab-data/diba/gor01vvp01pin01-metadata.h5', 'rb') as fid:
        with pd.HDFStore('gor01vvp01pin01-metadata.h5', mode="r", driver="H5FD_CORE",
                driver_core_backing_store=0,
                driver_core_image=fid.read()
                ) as store:
            df = store['Session_Metadata']
            df2 = store['Subset_Metadata']
            
    with fs.open('kemerelab-data/diba/gor01vvp01pin01_processed_speed.nel', 'rb') as fid:
        jar = nel.load_pkl('',fileobj=fid) # currently requires a specific nelpy branch

else:
    datadirs = ['/Users/ckemere/Development/Data/Buzsaki/']

    fileroot = next( (dir for dir in datadirs if os.path.isdir(dir)), None)
    if fileroot is None:
        raise FileNotFoundError('datadir not found')

    with pd.HDFStore(fileroot + 'gor01vvp01pin01-metadata.h5') as store:
        df = store.get('Session_Metadata')
        df2 = store.get('Subset_Metadata')
        
    jar = nel.load_pkl(fileroot + 'gor01vvp01pin01_processed_speed.nel')


exp_data = jar.exp_data
aux_data = jar.aux_data
del jar


['kemerelab-data/diba/', 'kemerelab-data/diba/gor01vvp01-metadata.h5', 'kemerelab-data/diba/gor01vvp01_processed_speed.nel', 'kemerelab-data/diba/gor01vvp01pin01-metadata.h5', 'kemerelab-data/diba/gor01vvp01pin01_processed_speed.nel', 'kemerelab-data/diba/score_all_sessions_5000_35000.nel']

Draw real place fields


In [3]:
# session_time, segment = '1-22-43', 'long'
# session_time, segment = '16-40-19', 'short'

session_time, segment = '22-24-40', 'short'

PBEs = aux_data[session_time][segment]['PBEs']
st_run = aux_data[session_time][segment]['st_run']
tc = aux_data[session_time][segment]['tc']
tc_placecells = aux_data[session_time][segment]['tc_placecells']

#####################################################################

NUM_COLORS = tc_placecells.n_units * 4

cm = plt.get_cmap('Spectral_r')
clist = [cm(1.*i/NUM_COLORS) for i in range(NUM_COLORS)]
clist = np.roll(clist, 0, axis=0)

npl.set_palette(clist)

with npl.FigureManager(show=True, figsize=(4,6)) as (fig, ax):
    ax = npl.plot_tuning_curves1D(tc_placecells.smooth(sigma=3), pad=2.5);
    ax.set_xlim(0,250)


Compute cross-validate sequence score distributions for RUN data in 4 sessions


In [4]:
#from dask.distributed import Client
# client = Client('tcp://127.0.0.1:38306')  # set up local cluster on your laptop
#client

In [5]:
import dask
from dask import delayed

def est_model(data, num_states, seed):
    hmm = nel.hmmutils.PoissonHMM(n_components=num_states, random_state=seed, verbose=False)
    hmm.fit(data)
    return hmm

def score_data(data, hmm):
    seq_lens = np.array([seq.n_bins for seq in data])
    return hmm.score(data) / seq_lens

In [6]:
ds_run = 0.125 # 125 ms bin size for Run
ds_50ms = 0.05 # used for smoothing
ds = 0.02 # 20 ms bin size for PBEs

sigma = 0.25 # 250 ms spike smoothing

num_states = 30

k_folds = 5

In [7]:
print('Building model for Session {}, {} segment'.format(session_time, segment))
s = np.argwhere([segment == segment_label for segment_label in df[df.time==session_time]['segment_labels'].values.tolist()[0]])
st_run = exp_data[session_time]['spikes'][s][exp_data[session_time]['run_epochs']]

# smooth and re-bin RUN data:
bst = st_run.bin(ds=ds_50ms).smooth(sigma=sigma, inplace=True).rebin(w=ds_run/ds_50ms)


Building model for Session 22-24-40, short segment

Analyze model parameters for RUN


In [8]:
# get run spikes
s = np.argwhere([segment == segment_label for segment_label in df[df.time==session_time]['segment_labels'].values.tolist()[0]])
run_spks = exp_data[session_time]['spikes'][s][exp_data[session_time]['run_epochs']]

random_state = 1
test_size = 0.2
description = (session_time, segment)
verbose = False

hmm_actual = HMMSurrogate(kind='actual', 
                          st=run_spks, 
                          num_states=num_states, 
                          ds=ds_run, 
                          test_size=test_size, 
                          random_state=random_state, 
                          description=description,
                          verbose=verbose)

hmm_coherent = HMMSurrogate(kind='coherent', 
                                       st=run_spks, 
                                       num_states=num_states, 
                                       ds=ds_run, 
                                       test_size=test_size, 
                                       random_state=random_state, 
                                       description=description,
                                       verbose=verbose)

hmm_poisson = HMMSurrogate(kind='poisson', 
                                       st=run_spks, 
                                       num_states=num_states, 
                                       ds=ds_run, 
                                       test_size=test_size, 
                                       random_state=random_state, 
                                       description=description,
                                       verbose=verbose)

run_hmms = [hmm_actual,
        hmm_coherent,
        hmm_poisson]

In [55]:
%%time 
n_shuffles = 50


for nn in range(n_shuffles):
    print('starting {}'.format(nn))
    for hmm in run_hmms:
        print("shuffling", hmm.label)
        hmm.shuffle()
        print("fitting", hmm.label)
        hmm.fit()
        print("scoring", hmm.label)
        
        # calculate and aggregate various gini coefficients
        hmm.score_gini(kind='tmat')
        hmm.score_gini(kind='lambda')
        hmm.score_gini(kind='tmat_arrival')
        hmm.score_gini(kind='tmat_departure')
        hmm.score_gini(kind='lambda_across_states')
        hmm.score_gini(kind='lambda_across_units')
        
        # calculate and aggregate bottleneck_ratios
        hmm.score_bottleneck_ratio(n_samples=20000)
        
    print('completed {}'.format(nn))


starting 0
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 0
starting 1
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 1
starting 2
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 2
starting 3
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 3
starting 4
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 4
starting 5
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 5
starting 6
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 6
starting 7
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 7
starting 8
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 8
starting 9
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 9
starting 10
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 10
starting 11
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 11
starting 12
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 12
starting 13
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 13
starting 14
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 14
starting 15
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 15
starting 16
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 16
starting 17
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 17
starting 18
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 18
starting 19
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 19
starting 20
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 20
starting 21
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 21
starting 22
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 22
starting 23
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 23
starting 24
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 24
starting 25
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 25
starting 26
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 26
starting 27
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 27
starting 28
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 28
starting 29
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 29
starting 30
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 30
starting 31
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 31
starting 32
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 32
starting 33
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 33
starting 34
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 34
starting 35
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 35
starting 36
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 36
starting 37
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 37
starting 38
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 38
starting 39
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 39
starting 40
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 40
starting 41
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 41
starting 42
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 42
starting 43
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 43
starting 44
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 44
starting 45
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 45
starting 46
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 46
starting 47
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 47
starting 48
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 48
starting 49
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 49
CPU times: user 53min 43s, sys: 54min 30s, total: 1h 48min 13s
Wall time: 48min 48s

In [13]:
%load_ext autoreload
%autoreload 2


The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload

In [58]:
from model_plotting import plot_transmat, plot_lambda
import matplotlib.colors as colors

## define figure parameters and color pallete
text_kws = dict(ha="center", size=7)
fig_kws = dict(text_kws=text_kws, cmap=plt.cm.seismic)
lambda_kws = dict(text_kws=text_kws, cmap=plt.cm.seismic, norm=colors.PowerNorm(0.5))

# Plot true transmat and obsmat
fig, axes = plt.subplots(1,2, figsize=(10, 6))
lambda_order = np.argsort(run_hmms[0].hmm.means.sum(axis=0))
plot_transmat(axes[0],fig, hmm=run_hmms[0], title=run_hmms[0].label, cbar=True, **fig_kws)
plot_lambda(axes[1], fig, hmm=run_hmms[0], title=run_hmms[0].label, ylabel=False, lo=lambda_order, 
            cbar=True, cb_ticks=[0.1, 4, 14], **lambda_kws)
fig.tight_layout(w_pad=10, rect=[0, 0, 1, 1])



In [57]:
# Plot actual transition matrix and shuffles
fig, axes = plt.subplots(1,3, figsize=(15, 12))
plot_transmat(axes[0], fig, hmm=run_hmms[0], title=run_hmms[0].label, cbar=False, **fig_kws)
plot_transmat(axes[1], fig, hmm=run_hmms[1], title=run_hmms[1].label, cbar=False, ylabel=False, **fig_kws)
plot_transmat(axes[2], fig, hmm=run_hmms[2], title=run_hmms[2].label, cbar=True, ylabel=False, **fig_kws)
fig.tight_layout(h_pad=.5, w_pad=0.75, rect=[0, .05, 1, 1])



In [43]:
from model_plotting import plot_transmat, plot_lambda, plot_sun_graph

# Plot sun-graph representation of transition matrix
fig, axes = plt.subplots(2,3, figsize=(15, 10))
plot_transmat(axes[0,0], fig, hmm=run_hmms[0], title=run_hmms[0].label, cbar=False, **fig_kws)
plot_transmat(axes[0,1], fig, hmm=run_hmms[1], title=run_hmms[1].label, cbar=False, ylabel=False, **fig_kws)
plot_transmat(axes[0,2], fig, hmm=run_hmms[2], title=run_hmms[2].label, cbar=True, ylabel=False, **fig_kws)

plot_sun_graph(axes[1,0], hmm=run_hmms[0], nc=npl.colors.sweet.green, **fig_kws)
plot_sun_graph(axes[1,1], hmm=run_hmms[1], nc=npl.colors.sweet.red, **fig_kws)
plot_sun_graph(axes[1,2], hmm=run_hmms[2], nc=npl.colors.sweet.red, **fig_kws)
fig.tight_layout(h_pad=5, w_pad=0.75, rect=[0, .05, 1, 1])



In [68]:
from model_plotting import plot_transmat_gini_departure, plot_transmat_gini_arrival, plot_bottleneck, plot_lambda_gini_across_states
# cm = plt.get_cmap('Spectral_r')
#clist = [cm(1.*i/NUM_COLORS) for i in range(NUM_COLORS)]
#clist = np.roll(clist, 0, axis=0)
npl.set_palette(sns.color_palette("hls", 8))

fig, axes = plt.subplots(1,2, figsize=(15,6))
plot_transmat_gini_departure(axes[0], run_hmms, **fig_kws)
#plot_transmat_gini_arrival(axes[1], run_hmms, **fig_kws)
plot_lambda_gini_across_states(axes[1], run_hmms, **fig_kws)
# # plot_gini_lambda(axes[7], [hmms[0], hmms[2], hmms[3]], **fig_kws)
# plot_bottleneck(axes[2], run_hmms, **fig_kws)



In [ ]:


In [64]:
d = run_hmms[0].results['gini_tmat_departure']
d


Out[64]:
[[0.87429403810591533,
  0.88550643178617705,
  0.90182115787073636,
  0.92433156992903298,
  0.89505421947636521,
  0.91482717757284493,
  0.94097006121326565,
  0.93987958580381048,
  0.9309336177697588,
  0.94606830539092113,
  0.94477778905268639,
  0.92877178106023184,
  0.9666637666753668,
  0.86860868908821021,
  0.85766787394862076,
  0.88722628706468953,
  0.92593706507747364,
  0.9332677489058161,
  0.9435861409338272,
  0.92667363929898339,
  0.90465308382102916,
  0.92341251214376951,
  0.92894685264237009,
  0.93141701951320455,
  0.95077363546472315,
  0.77333592113914718,
  0.88713539798745367,
  0.89561908209501706,
  0.88792110503220045,
  0.92570339649971578],
 [0.88106467601411131,
  0.91419131102615858,
  0.92477361862610208,
  0.92250625866993219,
  0.93061339048490566,
  0.94601820169575035,
  0.93720335423801138,
  0.92923397092301552,
  0.94310567999563044,
  0.92704896620498223,
  0.93037763480684244,
  0.9599979298243192,
  0.9258744793327387,
  0.92130976146935661,
  0.93745376549083403,
  0.90257175065349071,
  0.90691557821919833,
  0.90020154577282319,
  0.93191948942403346,
  0.94402625372485294,
  0.93474626731605437,
  0.94892014304098582,
  0.93446195496212481,
  0.90732696442073124,
  0.91527734661760618,
  0.9666637666753668,
  0.8665337824022975,
  0.86279131236622864,
  0.90731061016659875,
  0.93768896144870728],
 [0.91199703712051761,
  0.90392488329533616,
  0.92744769316324649,
  0.90624022587121378,
  0.9047831306896823,
  0.91073003409591302,
  0.94651893224011441,
  0.94346666540186197,
  0.9436450986360907,
  0.93964321920027827,
  0.93363929241938093,
  0.93512126391573069,
  0.92958187273576598,
  0.9666637666753668,
  0.90237552865040915,
  0.87436141593093353,
  0.89959996088104466,
  0.9322840551260243,
  0.94671605301154016,
  0.9398457327433104,
  0.92166796985921784,
  0.91840049480232178,
  0.92382433402604491,
  0.93147662951147669,
  0.95481844199455856,
  0.82118151932392369,
  0.86208902972590884,
  0.88170921143500436,
  0.91653291245851953,
  0.89656393735652573],
 [0.9015194851466457,
  0.87952095491939508,
  0.92151710207489335,
  0.93344976129815982,
  0.93989755667327668,
  0.90282059887119226,
  0.93381101707213765,
  0.91576201318035,
  0.93984472163244515,
  0.93441976130425231,
  0.94703233442085422,
  0.90409099684200023,
  0.91234058238596205,
  0.92077025309382488,
  0.90286775010209197,
  0.85769120587271297,
  0.93115991143878973,
  0.90701744750674107,
  0.92919200815170422,
  0.94166766206686903,
  0.93042838957943774,
  0.94614076323918084,
  0.94273178232317556,
  0.91123165589417365,
  0.9666637666753668,
  0.91784761256731484,
  0.81733982113901937,
  0.90961754824297647,
  0.8866389022990625,
  0.88788820902287113],
 [0.91515527760356408,
  0.89341444410858906,
  0.92546911992502434,
  0.89831279016132681,
  0.89092257705692213,
  0.8784986167693406,
  0.89636042721930664,
  0.93110787370874437,
  0.94018888066897355,
  0.93052438544083327,
  0.94600241830913523,
  0.94240469218719025,
  0.90410773478332829,
  0.93133819908612903,
  0.86451057196398085,
  0.90254152483252603,
  0.9239397454981304,
  0.94097802452732671,
  0.94147832071298576,
  0.93855334354289699,
  0.93514025645157983,
  0.93292492767342805,
  0.9576636942964516,
  0.83808494668523348,
  0.92618046683433097,
  0.84444931913737309,
  0.91627740563517091,
  0.88476850711538513,
  0.9666637666753668,
  0.83333123270854348],
 [0.92170922670487609,
  0.92191501925317643,
  0.91984170848867575,
  0.9028239650955997,
  0.9107954724120334,
  0.92891104385345624,
  0.94233193678172911,
  0.94656565749999477,
  0.94843028042716826,
  0.94475469888916341,
  0.92345296617821626,
  0.9666637666753668,
  0.92276637800012273,
  0.84916281858048082,
  0.87927321137299375,
  0.9260417533937022,
  0.9442838688625298,
  0.9398134600658008,
  0.93373588270135199,
  0.93712783129827293,
  0.93315097964907412,
  0.96000481082818823,
  0.85811598527892685,
  0.84801768156523361,
  0.92177371657585661,
  0.88516931602414772,
  0.91111727098663675,
  0.87897157792307745,
  0.88281249410617957,
  0.87924883360913586],
 [0.91559841734405722,
  0.92479713848701584,
  0.92912077208473365,
  0.9299297079744373,
  0.92085575089101912,
  0.94271097617226385,
  0.93988453947781148,
  0.93114152414049722,
  0.94567908580262372,
  0.94078159152948704,
  0.89515561271656741,
  0.93186737907881023,
  0.85408323551684728,
  0.90154075564532798,
  0.89422744985569902,
  0.90355501170379515,
  0.90504597964767075,
  0.93639355931341239,
  0.93285321594732329,
  0.88575519691154336,
  0.93711578518484062,
  0.9410563761358417,
  0.93144207820748026,
  0.92627893808597861,
  0.95173157938394581,
  0.83325140617682347,
  0.88518643227629179,
  0.89296046776518967,
  0.90009405213605875,
  0.9666637666753668],
 [0.92638466031814748,
  0.92644506709862928,
  0.91206671391648764,
  0.93545219643363942,
  0.94285917611680081,
  0.93488333608126806,
  0.9117466215379878,
  0.9061139779108659,
  0.91920525601224612,
  0.91100521878818008,
  0.91248667219920188,
  0.94940198029567668,
  0.90530810617366742,
  0.8749754253985107,
  0.92187253101324396,
  0.89985617086524261,
  0.90170265067378363,
  0.90205298894109287,
  0.94534623209676338,
  0.93888856819190492,
  0.92676351411531088,
  0.93748129838710803,
  0.92896328266241734,
  0.9418700130897707,
  0.93796688277345541,
  0.9666637666753668,
  0.82010083399673728,
  0.83399761379345205,
  0.80670811797763065,
  0.85887136489113725],
 [0.9202054497681702,
  0.91620067337675293,
  0.93201327470247175,
  0.93042518598973623,
  0.90840464303156299,
  0.89318380077458115,
  0.92142047125289894,
  0.94658240351033018,
  0.9480622985522984,
  0.93680862393974385,
  0.92423653148197193,
  0.94240888470999562,
  0.96249670300260881,
  0.87450403548325739,
  0.8561146573577425,
  0.88785838761125901,
  0.92510965681541446,
  0.93375954765113334,
  0.94238530273303411,
  0.93257471954228499,
  0.90353832045010385,
  0.89996425380689149,
  0.92908482551464899,
  0.93320982824704846,
  0.95619756181653592,
  0.79441383979140068,
  0.86698994056729028,
  0.88186438545530588,
  0.8766742134305382,
  0.87498040199596916],
 [0.91796232510485021,
  0.89990637551314823,
  0.900101357845418,
  0.91057290587876083,
  0.93826233891853017,
  0.94165286813679649,
  0.93484285099013187,
  0.93493784737300356,
  0.92648283267493647,
  0.93370514872470245,
  0.96166411819382747,
  0.92369183759934936,
  0.92417082722324717,
  0.92769452281513853,
  0.93482863659635163,
  0.91099864052083879,
  0.91293087622333036,
  0.91551103580722337,
  0.9410235415483752,
  0.94363817754938395,
  0.93946241489759541,
  0.9265071701820089,
  0.93449659574375121,
  0.93262097995125692,
  0.89422634987983507,
  0.9666637666753668,
  0.8619024302896614,
  0.90509235916867503,
  0.86969508305274745,
  0.89996311746423041],
 [0.89837282029647858,
  0.92361163401980828,
  0.9316358385043424,
  0.94457437089644569,
  0.93072889764043254,
  0.90985113242230131,
  0.94778632093671911,
  0.91812603863113029,
  0.93131305610678128,
  0.94784161127368627,
  0.92518657128878712,
  0.92614432013948012,
  0.93475998180739317,
  0.90000550817481995,
  0.90862844383315322,
  0.92961423857748526,
  0.93475022227321725,
  0.94537587150412328,
  0.94658624816090009,
  0.94119449686868517,
  0.92642859493167573,
  0.9666637666753668,
  0.91231619205956538,
  0.889990489705619,
  0.90668230164306196,
  0.80376250398777527,
  0.89822856010300789,
  0.87387980469600168,
  0.87619608217785705,
  0.81686273310953916],
 [0.92393926574898344,
  0.89352405047894923,
  0.90745188142101396,
  0.92384260358946768,
  0.92113958142133767,
  0.94117860626174721,
  0.94357303563720729,
  0.93304158403485127,
  0.93466297358281147,
  0.9228163354407567,
  0.9666637666753668,
  0.89264008832229169,
  0.90230021063496335,
  0.92145091655369415,
  0.93702359903466448,
  0.91791180399398675,
  0.92745364392660001,
  0.93861871810800568,
  0.92648970044436174,
  0.95925678339272236,
  0.83822377762334999,
  0.91120829502985845,
  0.88870796982544109,
  0.94615281897022119,
  0.91896020669381084,
  0.86870922905020809,
  0.90979096611604082,
  0.90567588356031348,
  0.85140325141286277,
  0.91678688391942176],
 [0.91462919132339782,
  0.90826068234382629,
  0.92955525725708332,
  0.92352290365049527,
  0.93305268488485815,
  0.92651326717765803,
  0.9286927726373978,
  0.88173736887131693,
  0.93238757378352621,
  0.92790203709190822,
  0.94826473811575451,
  0.866670441177947,
  0.92614899276099427,
  0.9224969982264779,
  0.94079686280211017,
  0.90153110096136424,
  0.91033499536517148,
  0.92183433368676704,
  0.92326163157224372,
  0.94022455030551433,
  0.93398451438105012,
  0.94886770835265477,
  0.9335783000480643,
  0.93786947357731798,
  0.9666637666753668,
  0.88436526784246206,
  0.8879677984268598,
  0.84381190799615435,
  0.83873140037880101,
  0.85366053752020687],
 [0.91477850907335645,
  0.91071520309850484,
  0.9374421086310023,
  0.93760617890435693,
  0.91053131414104993,
  0.92399094824846018,
  0.94117754616294225,
  0.94013980370264727,
  0.93389897998455706,
  0.94596493585828068,
  0.94091556463410009,
  0.92702254535214712,
  0.9666637666753668,
  0.84777608006089866,
  0.88891817888132918,
  0.84232590160348186,
  0.89205261619456266,
  0.88821414649157449,
  0.92227106370270007,
  0.9290970526073058,
  0.92441178759013298,
  0.93566587141742197,
  0.93047574735758454,
  0.93435656660415467,
  0.93079935680689752,
  0.94847188665948068,
  0.84361291419091322,
  0.88884874853227824,
  0.90928960770901168,
  0.89850363433022773],
 [0.89049451369478028,
  0.88021062208261402,
  0.8842934367510551,
  0.91805326179506741,
  0.93607152682857642,
  0.92695066566723916,
  0.92083849081425928,
  0.94143909713541263,
  0.93167220123419625,
  0.96024778938844313,
  0.90430844231578311,
  0.89813738724066394,
  0.92193388323423164,
  0.91183525475575589,
  0.87255404351872878,
  0.89323596551226636,
  0.9435753514132903,
  0.94605417988380458,
  0.95023904550823657,
  0.94521723458952156,
  0.92433246935641855,
  0.9666637666753668,
  0.9222379227119244,
  0.81654957331956679,
  0.8840706252962145,
  0.87625077433830634,
  0.92735202769886482,
  0.88500916955957276,
  0.93604496247950342,
  0.83790288366284038],
 [0.90232171078417189,
  0.91513543131350361,
  0.91829260716676997,
  0.92753179349946868,
  0.92284596981659872,
  0.9426710380736032,
  0.94225522083111213,
  0.95027156306628668,
  0.94521098817536309,
  0.9195356055431696,
  0.9666637666753668,
  0.85801068778041811,
  0.89873345202919241,
  0.90228886648737361,
  0.891332199554428,
  0.92086163522912412,
  0.92123550413513977,
  0.94129455137080065,
  0.93597270016085343,
  0.93873814416103396,
  0.93137708373970651,
  0.9315762621844359,
  0.96139066752545144,
  0.84446264544712202,
  0.87499567055391403,
  0.8909608824367854,
  0.88888611421215979,
  0.89645527916527779,
  0.79097047280793109,
  0.84828345778539915],
 [0.91119397912839273,
  0.91155149432921678,
  0.91736793538283312,
  0.92996648479631394,
  0.90009886471679978,
  0.93676371299917571,
  0.94977467011125716,
  0.94999026183556479,
  0.94443448906779992,
  0.92587525834534379,
  0.93000092017668556,
  0.9666637666753668,
  0.82037236276443326,
  0.88121520465177516,
  0.89210132178831358,
  0.91846189573474479,
  0.91633452969577422,
  0.94691865575909828,
  0.94343071904497666,
  0.92775301703091728,
  0.93840378162394178,
  0.93031574326510702,
  0.93624351334313172,
  0.95377272486324616,
  0.9158079764867828,
  0.80653956156240192,
  0.91477319478710717,
  0.86434084100286934,
  0.92054081557193634,
  0.88352017213682155],
 [0.89780677924679997,
  0.90387051188044421,
  0.92842246784389126,
  0.92504127470158093,
  0.89665440570389465,
  0.9032853393296788,
  0.92120016120556625,
  0.9475350935191087,
  0.93960084677128997,
  0.93060574739109247,
  0.94682500397237945,
  0.93459411768718204,
  0.92054106836575733,
  0.9001918566024687,
  0.88609375402680379,
  0.86867459396722335,
  0.88809578160936831,
  0.90747543394256347,
  0.90801497997808633,
  0.92063591251855859,
  0.94134965535079562,
  0.91445085212046573,
  0.9132681391403964,
  0.92439499686617443,
  0.93723348837409115,
  0.92878819804634671,
  0.95979751655458612,
  0.76112841474948456,
  0.88048242479071137,
  0.9666637666753668],
 [0.89705926385902879,
  0.88735677185376427,
  0.90220620373588423,
  0.94232277725723301,
  0.92679121834019407,
  0.89554423679240114,
  0.92662946667200075,
  0.92095276062563336,
  0.9284802146586324,
  0.96147958589563931,
  0.92500278909868217,
  0.89618184010563551,
  0.92155764287458597,
  0.91051527539028543,
  0.91639754562803677,
  0.92300965135677959,
  0.94393898215578542,
  0.93363471972668599,
  0.94613323494952717,
  0.94092897044277202,
  0.94314524786401566,
  0.9666637666753668,
  0.86442177209567239,
  0.87050838815154463,
  0.87670285109880186,
  0.82474043665650876,
  0.82384734228591627,
  0.91909266943260393,
  0.82122128307681608,
  0.91664296666409362],
 [0.8930863162358198,
  0.89857970836074219,
  0.92684257783023993,
  0.92924180414495916,
  0.93200391782645209,
  0.93340246331542143,
  0.90665257507516051,
  0.93468152148646688,
  0.91031207623214516,
  0.93138427399201162,
  0.95790587569304297,
  0.81687646882994636,
  0.92198559233167887,
  0.90084626808601564,
  0.93614043770962196,
  0.92815076900899929,
  0.86959997125699584,
  0.92375735265172243,
  0.93630305546120096,
  0.93477377580051946,
  0.94274899995488748,
  0.94876934425932635,
  0.94353201364308681,
  0.90212344093145946,
  0.92582932476407331,
  0.89992066423093542,
  0.91159988652876545,
  0.89665882206055669,
  0.89557307897867477,
  0.9666637666753668],
 [0.89597806744301045,
  0.90175735597212314,
  0.92315033265829916,
  0.93222216449870265,
  0.94328119429890434,
  0.91837729901484444,
  0.942535570601998,
  0.94629411076257541,
  0.94555072506231164,
  0.93618355677249177,
  0.93547981220239795,
  0.93334799394951096,
  0.9666637666753668,
  0.86753992438847083,
  0.89965177551096454,
  0.9048843634474063,
  0.93223961557874868,
  0.93929645825296482,
  0.92573748424373914,
  0.91913230980699701,
  0.92780499437522213,
  0.9314963191200194,
  0.95660924779972967,
  0.83305575110234853,
  0.88181626597675578,
  0.89695548841069705,
  0.92366900288806186,
  0.8833590195912604,
  0.90618122771690923,
  0.93036355603139242],
 [0.90440201676993848,
  0.89880278897876031,
  0.92420137603900965,
  0.94689921045383274,
  0.93352825374241677,
  0.93472167589207211,
  0.93910199993272692,
  0.93442813260886926,
  0.94469922988792809,
  0.94165712824946823,
  0.91992715522629998,
  0.89482745547498255,
  0.91840699898051359,
  0.9121983403683358,
  0.92996687220052066,
  0.93166402792548131,
  0.91208017213396764,
  0.91252989404068652,
  0.92810542564579301,
  0.9083221964903343,
  0.85690105823302098,
  0.92845910085749073,
  0.93340813283988033,
  0.96118281776647707,
  0.81666711666321556,
  0.86104028967501189,
  0.83331449937762991,
  0.88716500096883377,
  0.90739853287708272,
  0.9666637666753668],
 [0.85654817270029893,
  0.87613861392238446,
  0.93190908939940187,
  0.93425554294687585,
  0.93298916636793394,
  0.93281718032453032,
  0.93729433696093989,
  0.9331687899979576,
  0.94956677047390903,
  0.90167840628203721,
  0.90676383324886978,
  0.92743657292394921,
  0.92548170652643513,
  0.91021478266213651,
  0.8848486441876382,
  0.91929624271734012,
  0.9444845231267015,
  0.9432162266160492,
  0.93087516137143012,
  0.94389713107544471,
  0.92657479087297867,
  0.91515828491790607,
  0.9666637666753668,
  0.9196863013483576,
  0.90661186112472614,
  0.90005885050443568,
  0.88024602182494072,
  0.91180712266958563,
  0.82009958863486565,
  0.83814470048284928],
 [0.89964122458629037,
  0.89765931304364199,
  0.92511117404155829,
  0.93683547338493289,
  0.88947617237680421,
  0.88518300937587224,
  0.95134948388372997,
  0.95003016906885307,
  0.94392535644317699,
  0.89184431275005382,
  0.93168348264971834,
  0.89229820214013222,
  0.92098461777316065,
  0.92102431532655049,
  0.90459039369575389,
  0.92224935740998226,
  0.94536087695779003,
  0.94436542204166896,
  0.93897130402069084,
  0.90364958183663446,
  0.92860883266381866,
  0.961247525607973,
  0.84450066657207301,
  0.83543006682955945,
  0.8459408500893244,
  0.91665720682765262,
  0.91664361583396359,
  0.9666637666753668,
  0.90000065598384849,
  0.92056921254274759],
 [0.89890349361794386,
  0.90226124056216028,
  0.92307911152613287,
  0.94162124715852624,
  0.94125135859519959,
  0.91518907438079888,
  0.86946321086897516,
  0.92209362482611712,
  0.91919662396501689,
  0.93028608345845687,
  0.95643654442850379,
  0.91403316522823719,
  0.87196609499192412,
  0.9051794412252524,
  0.921080245688499,
  0.92010686793717211,
  0.94390841407179593,
  0.93133381872655074,
  0.94657614430538561,
  0.93754721368019744,
  0.93017432831903479,
  0.9666637666753668,
  0.9235299689266494,
  0.89755355152784277,
  0.88828758679893038,
  0.900777686221095,
  0.88733888410164163,
  0.95642776520600847,
  0.87791707682466058,
  0.83939217931286225],
 [0.91353763303957713,
  0.9172459428904004,
  0.93005631909817355,
  0.94265206953346026,
  0.94174437397693533,
  0.92127808224252117,
  0.92883322379711952,
  0.92593989707603253,
  0.9237617038900291,
  0.9596598057847614,
  0.87346831801305169,
  0.88375305661575787,
  0.92144752419307885,
  0.92382912321956601,
  0.92365347913673101,
  0.90874422288752998,
  0.91652850211294035,
  0.93422696823566087,
  0.94623034761613933,
  0.9458280399727782,
  0.94045937978368377,
  0.92019382341662215,
  0.9666637666753668,
  0.90365632789786798,
  0.90007043966312383,
  0.81421716527538546,
  0.87784486737357648,
  0.81804346403312678,
  0.8807217803918338,
  0.91590608465501566],
 [0.91817260335825768,
  0.90608897859599113,
  0.91346985193066399,
  0.91715513037151764,
  0.88446510876242779,
  0.89390205071958095,
  0.94105558936931888,
  0.94658613179177764,
  0.94997791264292653,
  0.9443985521892968,
  0.91170054016118962,
  0.93075108105956184,
  0.9666637666753668,
  0.88317336607241603,
  0.8892591631867709,
  0.92510863127683496,
  0.90608037121279195,
  0.90317530795407897,
  0.92949245275917114,
  0.94560176111854732,
  0.93633720987261027,
  0.93397193506932674,
  0.9393622227694497,
  0.9265466971359746,
  0.96113737658096143,
  0.88043311679142156,
  0.87606228017723298,
  0.81375495101009776,
  0.8482566688699742,
  0.86969658604186073],
 [0.88235290975115166,
  0.89805729958408353,
  0.93232339520172081,
  0.94244558475128459,
  0.91607755681428271,
  0.93049313217940133,
  0.94665972214970517,
  0.9495355008936871,
  0.93779988241479251,
  0.91838098862012796,
  0.9666637666753668,
  0.86208515562511634,
  0.9049119175754482,
  0.92650937620235108,
  0.94487083663992,
  0.93731606996254002,
  0.93835729558305869,
  0.93133379235175484,
  0.92797002964158326,
  0.94446558453014562,
  0.86205331467100044,
  0.87758137874025954,
  0.88079428196498122,
  0.85894059246230892,
  0.89998611373972581,
  0.91918184379311574,
  0.86002094851301758,
  0.8508826227595413,
  0.83018940232934513,
  0.89440186004965105],
 [0.88442648788327427,
  0.91826336637980299,
  0.9409171701165181,
  0.94128813155386071,
  0.93462417466838688,
  0.9100000912149433,
  0.9370708129807136,
  0.94186859404838708,
  0.88662052810560721,
  0.92447800002023583,
  0.90869821174142129,
  0.91902728942724532,
  0.89057623687172383,
  0.92643157347729377,
  0.94778615565160595,
  0.94552055560224946,
  0.93447485938751618,
  0.93636635960846493,
  0.92190054395829946,
  0.89116724275637671,
  0.9666637666753668,
  0.86032051156135148,
  0.85992926914012169,
  0.88450837000083893,
  0.92777500964241943,
  0.84433756530385273,
  0.87462011198686929,
  0.86111896565126178,
  0.92503242632511407,
  0.87311333420043269],
 [0.88268170429506276,
  0.89697991646732778,
  0.9306612993436616,
  0.92959521917651489,
  0.93063709262800698,
  0.93505478272639631,
  0.91483059307852732,
  0.90380505189507265,
  0.93206709174645241,
  0.9317127557089121,
  0.95137917887854484,
  0.82751196301794194,
  0.92234828342145836,
  0.91418152897393412,
  0.92144238804556089,
  0.93283997126288598,
  0.91150416710648563,
  0.92484303076399155,
  0.94534234752516766,
  0.93819279324139793,
  0.93185245592246968,
  0.93952293459675196,
  0.92873446059003717,
  0.9666637666753668,
  0.86279511226857675,
  0.91390965364206467,
  0.87484331491374245,
  0.83318502903079039,
  0.89451751214634412,
  0.9265371022796679],
 [0.91739885610064742,
  0.89784988749748451,
  0.92706198132767081,
  0.91233380931480657,
  0.91338970969498001,
  0.93739482600195967,
  0.94449996344428422,
  0.94651501698728291,
  0.93731184657414301,
  0.93124969769078103,
  0.88940462952406096,
  0.9666637666753668,
  0.91574819791460971,
  0.90639389419902971,
  0.92197666712450643,
  0.92754938801843445,
  0.9330618817967552,
  0.93200915734718048,
  0.91207401972811863,
  0.92132170981195227,
  0.92438384553943209,
  0.93323194839528245,
  0.94614646472149277,
  0.88365779276737277,
  0.88439186065445319,
  0.87902845126829487,
  0.88888791862788108,
  0.92293602037901867,
  0.87925980118905511,
  0.90240291482842283],
 [0.91746784647943724,
  0.92071738646730283,
  0.92109698573911181,
  0.94389862304793681,
  0.91020396174589591,
  0.90168659120474859,
  0.92090344516492872,
  0.92467397823371356,
  0.92445487340712795,
  0.92668921230807422,
  0.9549637637317332,
  0.85156815383647411,
  0.8777597210978948,
  0.92098827816068829,
  0.94269523444959002,
  0.94599763679157478,
  0.93259435530736923,
  0.94624486445897815,
  0.94434714050193447,
  0.91488210812098725,
  0.95713715981270597,
  0.96222547308629702,
  0.8773351008156921,
  0.90775945413965564,
  0.90783248001243988,
  0.9274065183682727,
  0.92449332875882584,
  0.9017124111735072,
  0.91836545591120333,
  0.88875696219137401],
 [0.89103367956266977,
  0.9017069386792449,
  0.91526472972946382,
  0.91485245752581279,
  0.92505246474908831,
  0.94126979151710155,
  0.93226383185819173,
  0.93186409629161482,
  0.93971761976037083,
  0.9307173423369145,
  0.92751925310291472,
  0.9519182963991264,
  0.83317974340145284,
  0.89760842098366389,
  0.91268710154465882,
  0.91868090871920516,
  0.93107964055974735,
  0.90830134736088364,
  0.93842720484238462,
  0.9143184735294867,
  0.93575808241756819,
  0.9417817116655286,
  0.94296399542409925,
  0.91421876627508669,
  0.927304486332438,
  0.9666637666753668,
  0.73856168347377438,
  0.87837988919985277,
  0.84447138818016798,
  0.88103729803332209],
 [0.923452582737046,
  0.92072624539319803,
  0.93415402317397267,
  0.93048797222485435,
  0.91172095311049239,
  0.91204656619420321,
  0.93733898411953787,
  0.93153773817143015,
  0.93146617524412056,
  0.93239951923426434,
  0.94213701803246408,
  0.93872619971878113,
  0.9205593329544135,
  0.9666637666753668,
  0.89239311933993748,
  0.88665773070188969,
  0.90182314789579399,
  0.91838476896586396,
  0.94748343021505532,
  0.93746503986827823,
  0.93404577046875825,
  0.93815886110193314,
  0.92711534190178169,
  0.96139752603280892,
  0.84367966058995048,
  0.83895814434729332,
  0.89203006488854986,
  0.90201441764902024,
  0.91158723805402542,
  0.89729945613618411],
 [0.90213616024213439,
  0.90904678648534509,
  0.93064790420848764,
  0.94121381361898193,
  0.91548207635452117,
  0.92830830454249491,
  0.94262876871889922,
  0.93042874709104073,
  0.94626154739578916,
  0.94118419796229591,
  0.92623926549183921,
  0.9666637666753668,
  0.89824167550884693,
  0.90361996558724333,
  0.9140192955007902,
  0.92228749616111816,
  0.91739236469119645,
  0.92633028406661255,
  0.93956623166578346,
  0.90638465632622889,
  0.9339464093178661,
  0.9164196119974769,
  0.93803166940118676,
  0.92760315217815936,
  0.95831479975243883,
  0.78007175994904909,
  0.8333310438637499,
  0.89181286809696303,
  0.884793537694468,
  0.93333053334173333],
 [0.90585780452298947,
  0.90003273462000621,
  0.91693456466237755,
  0.94104679775957956,
  0.9064320111248243,
  0.91296331412355225,
  0.93690252830795839,
  0.93930804081884889,
  0.93282469463058182,
  0.94989018058540053,
  0.8994218054236981,
  0.92004075032114996,
  0.90214475110096115,
  0.92081271999789882,
  0.90019857566667361,
  0.94929973929186928,
  0.92990983848712827,
  0.93904872678913809,
  0.94113788414539434,
  0.93086289927050214,
  0.94093073719678488,
  0.9322149813791254,
  0.9666637666753668,
  0.89212532145696632,
  0.90043998648340151,
  0.91047489756189581,
  0.86190264935026251,
  0.90926333052454855,
  0.80701818184640128,
  0.91826071965855438],
 [0.92001120911723822,
  0.87923315315619377,
  0.93247758927735824,
  0.92173113510274896,
  0.9397106807075799,
  0.93281549525061014,
  0.90979512286522046,
  0.87898857064054647,
  0.92876647445989735,
  0.92833869782056466,
  0.9545991384631497,
  0.90338122863101356,
  0.82364343652743055,
  0.81371248026984078,
  0.88503498736010322,
  0.90707541628508981,
  0.89194291328156994,
  0.93566052092683327,
  0.94129474124367518,
  0.94610936698316217,
  0.94818545839794877,
  0.9447805334730156,
  0.93487674488838568,
  0.9666637666753668,
  0.92200277490863636,
  0.87325205537590345,
  0.80674995694405449,
  0.87213712440888225,
  0.91133628566761049,
  0.92347913529024928],
 [0.90617705001803739,
  0.90624737245421239,
  0.9172349465283014,
  0.92454252814271809,
  0.94258690796753331,
  0.93969221587159979,
  0.93374294032475436,
  0.92977328301945827,
  0.9352744464640208,
  0.91450220087874345,
  0.95738879366371776,
  0.86703366019420869,
  0.92569440472355824,
  0.89671716830633008,
  0.9161045257178041,
  0.91357377002156948,
  0.92749280912284227,
  0.94721863310096255,
  0.9429539618282794,
  0.93102564550225475,
  0.9460721913942175,
  0.9409800799279987,
  0.88353283664647786,
  0.9666637666753668,
  0.95029959757348093,
  0.91567892729118838,
  0.86716040087377333,
  0.87990567897721483,
  0.89176788561881626,
  0.89747127039623942],
 [0.91942192149778956,
  0.89823808857902976,
  0.88712458112125658,
  0.9139564672807039,
  0.90843250044823454,
  0.93422483053678862,
  0.92209710166956238,
  0.93996305938583924,
  0.94658115177238344,
  0.94842407909226367,
  0.94476599827644325,
  0.93663079284291995,
  0.9666637666753668,
  0.8854398132174196,
  0.8874558705848522,
  0.90334165618729123,
  0.93595649070053355,
  0.93617357440157123,
  0.93493712240386961,
  0.92682403313487371,
  0.92735587688589505,
  0.95531661249976874,
  0.84465287831922709,
  0.87005967602617651,
  0.89989609939321202,
  0.89948710350549432,
  0.89960436743353978,
  0.90469432741109712,
  0.85556414557640759,
  0.92221719529731661],
 [0.88718236991332877,
  0.9190972558083742,
  0.92195542319125479,
  0.92584713450459166,
  0.94098168495964163,
  0.93647861759378026,
  0.89888241363425747,
  0.91055198793948056,
  0.9257881800769806,
  0.93594568216300689,
  0.93323669729380831,
  0.94936888277736287,
  0.89423237481663942,
  0.8975191992644016,
  0.89864990255778265,
  0.92865437027667286,
  0.92990285925836558,
  0.92086773152352119,
  0.94927796182810165,
  0.9435473731977353,
  0.93123615697888462,
  0.94582051614155349,
  0.93947718835241945,
  0.92466783131436758,
  0.91861641609131273,
  0.89978969413099408,
  0.86675148620671405,
  0.87272098799112552,
  0.96364859785820722,
  0.82419037910319792],
 [0.91092965213106691,
  0.91730541851758129,
  0.92419231290015258,
  0.92806399003637197,
  0.93485024837836284,
  0.93374386803958365,
  0.91165872137022974,
  0.90482243968883447,
  0.90730232504025365,
  0.92934053826287089,
  0.92795522950706866,
  0.95944837210103517,
  0.84361217074242512,
  0.90710348282049569,
  0.90588343195289034,
  0.92058186635014927,
  0.90716505264870084,
  0.91182873432955558,
  0.89624903319916205,
  0.93143772496047916,
  0.94189879796759313,
  0.93126025373913512,
  0.94188319027048972,
  0.93647131838460307,
  0.93331677093500709,
  0.93499619283328828,
  0.9666637666753668,
  0.88521909407644006,
  0.92962911803715043,
  0.87066219860821681],
 [0.92710409310961717,
  0.92317755974602156,
  0.92240473127932376,
  0.91823247996710033,
  0.91445733497019732,
  0.92826242597707309,
  0.94310950577309749,
  0.93144880851128731,
  0.94520348831690404,
  0.93235701384014769,
  0.92668741347834704,
  0.9666637666753668,
  0.87992751489283305,
  0.89410590148407543,
  0.9086470353618411,
  0.926594168584708,
  0.9377755018052536,
  0.93774068721196546,
  0.93494728899228263,
  0.9315772374597906,
  0.93156064757680945,
  0.95499556302386079,
  0.86342269961817597,
  0.87233608933057782,
  0.91441291761275334,
  0.9002003793200769,
  0.93038557347234896,
  0.87413704858072561,
  0.84666483249732161,
  0.89368778391390247],
 [0.89016380315930599,
  0.88963123047467441,
  0.91401594660940333,
  0.94438544349956721,
  0.93981097388778057,
  0.93370912384334093,
  0.93028773339473336,
  0.93446157694668197,
  0.9563900576556591,
  0.91131980482159225,
  0.91807396169801936,
  0.93250481323054979,
  0.93265211916678048,
  0.93306384562245537,
  0.9358618848819048,
  0.9444066174196557,
  0.9350061878467858,
  0.92499326068148202,
  0.93970439320875565,
  0.93629924687490718,
  0.9666637666753668,
  0.89987296169947695,
  0.90063194804859781,
  0.8939042300385116,
  0.88518314218278749,
  0.92259277102910553,
  0.89999716142798991,
  0.87777139159100193,
  0.89130391306182244,
  0.84476584473211414],
 [0.92854977234556568,
  0.89032237576593831,
  0.89414225518730117,
  0.89590808340683736,
  0.89785334945160633,
  0.90027506059910645,
  0.94538839226369342,
  0.94659470339386798,
  0.94735258965964053,
  0.94719870436100595,
  0.92223917482823115,
  0.9666637666753668,
  0.88171575454351558,
  0.87835587892828126,
  0.91093661485157029,
  0.92632305022953654,
  0.92827988811808215,
  0.93941885696492833,
  0.94318318828778014,
  0.93364076599998302,
  0.93918133584623487,
  0.93285042581102673,
  0.9555383241845995,
  0.92214719995821981,
  0.83335331358298881,
  0.88645885042074457,
  0.90736956051622297,
  0.84441988183559058,
  0.95833578017726184,
  0.89441057519664535],
 [0.8860431621627558,
  0.8788556456255664,
  0.88475517420421512,
  0.91918482179377792,
  0.92760489567587967,
  0.94185224828014047,
  0.91582677961595871,
  0.91647737904804205,
  0.92667179188330018,
  0.91905142145010854,
  0.92418041673535078,
  0.92677803839229678,
  0.96139310275980527,
  0.90552846856961244,
  0.90208207428250942,
  0.92763833363446291,
  0.92094951278691706,
  0.8977232432965091,
  0.92263991948378976,
  0.94192023095769473,
  0.94660029580292882,
  0.95024890507445703,
  0.94478321014714728,
  0.88823204880220474,
  0.95940132666134437,
  0.9666637666753668,
  0.84363529722659181,
  0.82962593581810662,
  0.8555579293625527,
  0.86406625371064461],
 [0.88850684693280635,
  0.93793047089197579,
  0.92180188023673681,
  0.92773280412096459,
  0.91853576586971564,
  0.92665021317459761,
  0.94401000197291429,
  0.93983563063739106,
  0.92948846292217502,
  0.94653784748063607,
  0.92269266897159885,
  0.95860853912122757,
  0.92701317590078181,
  0.91418154937477936,
  0.92058094524340894,
  0.89121633478860018,
  0.84508871554106979,
  0.88242749186934233,
  0.94259310250056316,
  0.94658070021695462,
  0.95005102081122161,
  0.94555288514566449,
  0.92324705347330072,
  0.9666637666753668,
  0.93223419665025542,
  0.91784787903700382,
  0.84467453987051555,
  0.91666387031005081,
  0.88933050302179795,
  0.88995405576358777],
 [0.91769695723749789,
  0.89017069271625304,
  0.90922959324952701,
  0.93210468511763733,
  0.91970790932634061,
  0.94744048261274105,
  0.93982080095161469,
  0.93130895379253953,
  0.94661172007107353,
  0.9412305528832885,
  0.90898331615890515,
  0.91453394144748423,
  0.87127818294236203,
  0.84743751241200538,
  0.88073875083773834,
  0.91140627348734016,
  0.91294988598768345,
  0.94369703287618656,
  0.93441781805447932,
  0.90721826288450791,
  0.93322125955144986,
  0.9302349642304949,
  0.93158407800992371,
  0.95647479478875541,
  0.81665660778421378,
  0.89999728795593248,
  0.93730154437300928,
  0.85382118685772412,
  0.92728602256334836,
  0.96382242627811632],
 [0.9151543579975725,
  0.91612661995851297,
  0.92604890365702441,
  0.91154010567667998,
  0.93147391092032661,
  0.9148824429303557,
  0.91089889153622805,
  0.93808638564821112,
  0.9423380537874374,
  0.93052662424349764,
  0.94600355538088998,
  0.94240345448789087,
  0.91136397285361226,
  0.88601198035501183,
  0.9666637666753668,
  0.90217595936369888,
  0.89669875484728001,
  0.90834676223728805,
  0.9209699507319723,
  0.93945717043709742,
  0.94390986110418185,
  0.93932366583135607,
  0.92676965470002659,
  0.93159085817834253,
  0.95836440056297523,
  0.84471175496606699,
  0.82002866021282428,
  0.90746034883220783,
  0.8789189372633277,
  0.89680546905043024],
 [0.86329071186369521,
  0.84100141435171638,
  0.88305583999685655,
  0.92040784339421622,
  0.92971628783444837,
  0.93580602592782136,
  0.94658903229450886,
  0.95025426962885784,
  0.94520456472107883,
  0.91341685209473611,
  0.9666637666753668,
  0.89031063015196776,
  0.86957761602159644,
  0.85389948173319652,
  0.89991860075726993,
  0.86283961347031313,
  0.91434588279308471,
  0.93157607727469327,
  0.92473369659963933,
  0.93907853734966262,
  0.93922056492080053,
  0.93373737017232006,
  0.93879605406895494,
  0.93231608234496044,
  0.96017470468759614,
  0.83403558997610572,
  0.80347596419144895,
  0.8524613091874057,
  0.86020238016684014,
  0.95423421154755195],
 [0.91976221859555041,
  0.91470150696679131,
  0.9317035927168853,
  0.92243847483796793,
  0.91125939695123892,
  0.92969311086890372,
  0.94348658509105632,
  0.93497950689314968,
  0.9323983377467151,
  0.95055954688858824,
  0.93101293783537886,
  0.93933054135431837,
  0.90721261434964329,
  0.91511157713363911,
  0.87984221218077929,
  0.89705102730910846,
  0.90976639907746659,
  0.90056396065081945,
  0.91248626035265201,
  0.92789903555225883,
  0.94005896967193503,
  0.91762784138320586,
  0.90045498360604503,
  0.94404527055990217,
  0.93936386843474673,
  0.93351497160625396,
  0.94320919127394731,
  0.87164556653251601,
  0.877385567070603,
  0.9666637666753668],
 [0.86862528632963254,
  0.89756115585952068,
  0.91266694271796311,
  0.94437916517542964,
  0.92237821879622561,
  0.91146396847321698,
  0.9329674501580445,
  0.9382783610050488,
  0.93218303823331305,
  0.9482007366469789,
  0.88272991064494144,
  0.89519476715779389,
  0.90814207725074325,
  0.89561385964175222,
  0.93013999242583201,
  0.92820653423165922,
  0.90419693575445648,
  0.92373612062217991,
  0.93946669585895859,
  0.9466945230906858,
  0.93134045017735356,
  0.94623452411082321,
  0.94274174268287081,
  0.9371441169005944,
  0.9666637666753668,
  0.90181178329318956,
  0.88788168206296825,
  0.9004262448207081,
  0.86004628879372103,
  0.87334023596325117],
 [0.89829871272806272,
  0.91421459445539743,
  0.91839939031066398,
  0.92934563624176114,
  0.92997033340067703,
  0.93016962999925545,
  0.93100910753830068,
  0.93767641211027575,
  0.9265052816309971,
  0.96125213545026356,
  0.91323477820887289,
  0.85216082817223371,
  0.89275162430061838,
  0.94712813914938165,
  0.91352027757865661,
  0.89555853988777534,
  0.88350135833456511,
  0.92083439781187759,
  0.94389607757357008,
  0.93127516194533544,
  0.94583679509384189,
  0.94328079945272059,
  0.93175484351899762,
  0.9666637666753668,
  0.92520364856959658,
  0.88408835784271977,
  0.86668317099682368,
  0.88459461120368044,
  0.86740304140760771,
  0.82448017840463905],
 [0.91674496109875447,
  0.91119168986709609,
  0.9303873482131062,
  0.93229584322788861,
  0.90184682329677923,
  0.90595870476052376,
  0.9367078503461248,
  0.94390830109648738,
  0.93337981595220265,
  0.94662419871864034,
  0.93076360632168109,
  0.92674109207764799,
  0.96365576692691068,
  0.9083682433292859,
  0.81312023645627396,
  0.81518524757466582,
  0.84276554900530332,
  0.90965100209056782,
  0.9464295750515892,
  0.94046498681895851,
  0.93494145944459728,
  0.93094597705313653,
  0.93154603889823062,
  0.95914556021289454,
  0.86174567336287089,
  0.89492132274520353,
  0.8965416952010844,
  0.83328948566267858,
  0.90003861218859227,
  0.86315468894440817],
 [0.89929466463970198,
  0.91027083172440892,
  0.91974388113459904,
  0.92176441371859319,
  0.91188222527177276,
  0.94448821648924908,
  0.94298571265338116,
  0.92977447201526098,
  0.92216970284816324,
  0.90881795597302484,
  0.92223821687337315,
  0.853984745534899,
  0.90710776609804844,
  0.92844877869772735,
  0.94036438406028733,
  0.9269359386490289,
  0.91785106068906019,
  0.93329476025633251,
  0.93239768059267158,
  0.95535149941600295,
  0.79697712884923744,
  0.89795324398202914,
  0.88944557568470195,
  0.92998960961678712,
  0.88946856363797477,
  0.90002906931440141,
  0.88363076583898881,
  0.9666637666753668,
  0.93212147725047234,
  0.86123166577093568],
 [0.91363950849633557,
  0.92647212176781368,
  0.92100233628483574,
  0.93054352510224059,
  0.94121873379454279,
  0.92116885291896267,
  0.90249904145281634,
  0.93278579273958306,
  0.9409028947880953,
  0.93189796380369061,
  0.95204059626317072,
  0.90176461694993459,
  0.88825711613180269,
  0.87455599211118051,
  0.92335925655779894,
  0.91768374964122745,
  0.92575654691212017,
  0.93603771128250945,
  0.94849980119376187,
  0.9347390919368177,
  0.93159288507149418,
  0.94567655407217843,
  0.94114251441311869,
  0.92059919516555044,
  0.9666637666753668,
  0.93295600396345857,
  0.89169543050143429,
  0.79074885185614474,
  0.85843355248999942,
  0.87344007982222927],
 [0.91566430583648473,
  0.9239724247874137,
  0.93150955950237546,
  0.94200241949134544,
  0.93723261408386327,
  0.91458684766543707,
  0.90641964758269522,
  0.92608374068789834,
  0.93148850471906397,
  0.9568890506948925,
  0.92723374818674476,
  0.9242368799548637,
  0.93568058288232592,
  0.93379084566410708,
  0.87452608847272439,
  0.92331422323857837,
  0.94055197776336086,
  0.9311512831684563,
  0.94241723987334391,
  0.92551787590715762,
  0.91473202583029045,
  0.91102875668896499,
  0.9666637666753668,
  0.87127927541267536,
  0.88940632818263832,
  0.90831972002414907,
  0.80695081522196777,
  0.8331746704732047,
  0.90289322259828875,
  0.91545582221676047],
 [0.90262581087672078,
  0.91364261067846975,
  0.90353891134632192,
  0.9666637666753668,
  0.90869440371424248,
  0.91609479289962714,
  0.92493869144621532,
  0.9388819110171005,
  0.93797083764263334,
  0.92153614683714236,
  0.87085338705144033,
  0.95001479129280719,
  0.91050320445503452,
  0.93735819181097035,
  0.96075554623989912,
  0.90466571984118216,
  0.88184426624094681,
  0.92327650362504721,
  0.93841508260996009,
  0.93364050676776733,
  0.92937107151392173,
  0.92526129755801245,
  0.94175162528403689,
  0.93235527501443571,
  0.94448152017872899,
  0.92946131963347955,
  0.84835580164664826,
  0.91953701705362589,
  0.88466012922031256,
  0.87060735596551664],
 [0.90122239532838533,
  0.90455066464529499,
  0.90527556370721896,
  0.91223624495989164,
  0.91889266649550272,
  0.91064391422730395,
  0.88830186952252788,
  0.90690680598409301,
  0.92781044066600127,
  0.92620604647867821,
  0.95578592871801615,
  0.84666612115870832,
  0.9080810856619026,
  0.92352640978208045,
  0.92012434825742673,
  0.93797817653589532,
  0.92204986628722674,
  0.94271736882390889,
  0.94405747254453265,
  0.94404320652752172,
  0.92328017146503971,
  0.9335840504816475,
  0.94306631031265653,
  0.9666637666753668,
  0.92177354337659023,
  0.83475938709239572,
  0.89705972503967557,
  0.88401005534166799,
  0.80478073317313337,
  0.90633941549250419],
 [0.90619779895828578,
  0.90722155381652481,
  0.93538652652849485,
  0.94618940868782808,
  0.9372776347771965,
  0.90190898733687108,
  0.92949667429377381,
  0.93335916877962821,
  0.92671350332790281,
  0.96139623079039693,
  0.81667310430160556,
  0.86473703935220303,
  0.85918538916284182,
  0.88157445452179295,
  0.84964647728045595,
  0.91436344022868121,
  0.93429092236903233,
  0.94184014738092947,
  0.91273662137903488,
  0.94727249610769537,
  0.94609992409763743,
  0.93110341490900916,
  0.94582362220651739,
  0.94327303365384785,
  0.92551832778577126,
  0.92257889194742226,
  0.89860765960404143,
  0.85898181816897912,
  0.87038635533206721,
  0.96666273308633754],
 [0.89152964720811556,
  0.92582265688290877,
  0.91278572649724865,
  0.91565006799425741,
  0.90403190979596415,
  0.90069788438287324,
  0.93342817085899243,
  0.94325871291253416,
  0.93102679766729779,
  0.94533358749956631,
  0.94243041302446451,
  0.92795401479153017,
  0.92724623236796055,
  0.9666637666753668,
  0.91014134350235687,
  0.87813668809322187,
  0.90625906517544275,
  0.90510571610554891,
  0.92947140679705309,
  0.94136082026217316,
  0.93428132102966766,
  0.93769652218675847,
  0.93039634402426097,
  0.93606843570016351,
  0.94764676807583315,
  0.89320688423949257,
  0.91855489755800013,
  0.81606134219030502,
  0.82693262513830001,
  0.91588321986514054],
 [0.88175159724770902,
  0.88821362882850763,
  0.89960509655056353,
  0.90222036400870642,
  0.90248459655517133,
  0.93014747027055888,
  0.94092115265657728,
  0.89420322025232035,
  0.88183762952630251,
  0.92058614363377389,
  0.92244773102831723,
  0.92443745046950199,
  0.93618871093942313,
  0.95565685932842059,
  0.91682776416335221,
  0.90478383064619206,
  0.93849674173209541,
  0.91407483629023478,
  0.90433631540289783,
  0.93561583029358797,
  0.94908737670624588,
  0.95001810597913294,
  0.94394899300544144,
  0.93176018812466188,
  0.9666637666753668,
  0.88665670025068821,
  0.82147035747569641,
  0.87114340990715866,
  0.8628593621724947,
  0.89594492601353826],
 [0.90401274905437023,
  0.89354816112170199,
  0.90025642072732748,
  0.92082175514571263,
  0.94443079705491917,
  0.92259469387016402,
  0.88357534860814058,
  0.93957269123281884,
  0.93108182610521595,
  0.93160244338737463,
  0.95789472515698315,
  0.84354676907791293,
  0.88504077024112515,
  0.92819985242289249,
  0.94389744334058778,
  0.93136293403263237,
  0.94634051632245741,
  0.94259278924206191,
  0.92667300398784092,
  0.9666637666753668,
  0.92819692892570582,
  0.90343087262128108,
  0.91843256746689317,
  0.85013717261084021,
  0.89294061755037601,
  0.89727676128050871,
  0.89204970797157324,
  0.83135721673106111,
  0.88806265044580701,
  0.88971978312098576],
 [0.89310260537293495,
  0.9159341537767709,
  0.93016076813712745,
  0.92074370804485151,
  0.92006539976965018,
  0.91308453138527568,
  0.94343323858017814,
  0.94657375606740679,
  0.94842857233880262,
  0.94357067101031666,
  0.92329602519438236,
  0.9666637666753668,
  0.90814263647850246,
  0.89129148727577978,
  0.91093921585519844,
  0.94626508695082612,
  0.93853737698952977,
  0.92853786225544854,
  0.93794345117718336,
  0.92672404247049511,
  0.95492861170151977,
  0.8421610712494465,
  0.88437712538820401,
  0.90543061412575332,
  0.85628567537426858,
  0.93333034343507593,
  0.901834300333339,
  0.86498182088702291,
  0.86670166623477451,
  0.92480862044319168],
 [0.92858800866279789,
  0.91850892771310944,
  0.92506755326148915,
  0.94086937140061855,
  0.92674589921202233,
  0.9285525703033316,
  0.9402866156060643,
  0.93288342731074214,
  0.93995092464403118,
  0.92550118518171853,
  0.92742612931330426,
  0.92499694959216261,
  0.9666637666753668,
  0.8621117580120321,
  0.90354732819920414,
  0.92336335751280818,
  0.92601449748687437,
  0.93263270397426679,
  0.927370465413347,
  0.93631276807050701,
  0.9312082216690134,
  0.93261064433427232,
  0.9601660558994165,
  0.81111742123586006,
  0.87037577821517553,
  0.91945156967961128,
  0.85703671884464949,
  0.87551775139353294,
  0.9380924386135755,
  0.91413160750931011],
 [0.91873571032296864,
  0.88328904540211894,
  0.8494268443162637,
  0.89672843872056596,
  0.89393752289743422,
  0.91362205047904699,
  0.94731715560633323,
  0.94685422981487455,
  0.95025561628683097,
  0.94352829211752243,
  0.91054221974674376,
  0.92946780308975208,
  0.8401642417733457,
  0.89047456298521821,
  0.88273118326601141,
  0.91296262910885262,
  0.93844034342571292,
  0.94396643527891644,
  0.91241233919089637,
  0.93000690993387058,
  0.91930652003974389,
  0.9150768022814787,
  0.92900936480083063,
  0.93491552871538008,
  0.93928148539856549,
  0.82772764499181828,
  0.83529472617696843,
  0.89390517799294922,
  0.9666637666753668,
  0.88888626145782523],
 [0.90196580861061393,
  0.8889272958101202,
  0.9410413246630176,
  0.93089182477608479,
  0.93889978566565502,
  0.93259276090236354,
  0.89926733996163777,
  0.89635345625785467,
  0.92727674316604525,
  0.92554287024547333,
  0.95531496000858285,
  0.92574358804918777,
  0.91569199057197437,
  0.91657909635323676,
  0.91043787923209341,
  0.87916165893021381,
  0.90950859220425329,
  0.94054958681310785,
  0.93821903002300988,
  0.94167696064646389,
  0.93531242813865145,
  0.91657865534149841,
  0.93443040851801029,
  0.92773719387607234,
  0.93751044519710292,
  0.9666637666753668,
  0.89950494058499664,
  0.91851246985887569,
  0.89443515387855843,
  0.80663885025702842],
 [0.91242010973559606,
  0.90443851876080972,
  0.92349419537427047,
  0.94209068997832812,
  0.91415647763171404,
  0.92830021875947466,
  0.94305156978470472,
  0.93048762848911859,
  0.94577187843700095,
  0.94190010266920943,
  0.92089058040131067,
  0.9666637666753668,
  0.89461193076286039,
  0.89238226337607029,
  0.92407857880240085,
  0.92049759863173408,
  0.94229336607922931,
  0.92307511870881498,
  0.93315306753920502,
  0.93736850911621539,
  0.92147061247029338,
  0.95686496699757206,
  0.79099602345056119,
  0.8542995198420843,
  0.92345141733317948,
  0.91679493809770085,
  0.888790705368253,
  0.86397111404785232,
  0.89532390331844769,
  0.93333053334173699],
 [0.88312905384221541,
  0.91490453524618998,
  0.92417528212877764,
  0.94514891465181505,
  0.93002550590449351,
  0.9410926570308259,
  0.93026410948938554,
  0.92727043953482857,
  0.95925235995631608,
  0.84416646990738631,
  0.89611142874838701,
  0.9204361232596765,
  0.94931222431823192,
  0.94295332201106752,
  0.93091699969215858,
  0.9458139025984571,
  0.94190612380577998,
  0.92638634823878874,
  0.9666637666753668,
  0.89724674427852125,
  0.89129280435738933,
  0.91067187599879573,
  0.85999558353011873,
  0.8662661146936681,
  0.88034847346766099,
  0.94797902824400682,
  0.86930946343490589,
  0.90127861420439936,
  0.92757748995269462,
  0.92063645665100835],
 [0.90970822925053751,
  0.90173062381954572,
  0.9277592188731405,
  0.92513132763707528,
  0.87554739112684299,
  0.91739749118352076,
  0.94559446766978394,
  0.93238912502045057,
  0.9418739503632968,
  0.94846100715092296,
  0.94430299205833967,
  0.9233768315778782,
  0.9666637666753668,
  0.86957501547199012,
  0.90241610206882228,
  0.92875702644823555,
  0.94523372360986868,
  0.94034794581401593,
  0.92892947027884454,
  0.94222393212428524,
  0.92317133069223622,
  0.92650407704651483,
  0.95925289252802515,
  0.85896823509725906,
  0.88823571773082466,
  0.88066975384394663,
  0.88632123658390438,
  0.92140619321079309,
  0.92030961689477708,
  0.87667487029078384],
 [0.90467506993173175,
  0.90484344624141044,
  0.92846441933676938,
  0.94699177516646493,
  0.94070028745164291,
  0.93393350592492408,
  0.93882850781287275,
  0.92771116463104719,
  0.9613979860162809,
  0.91753322036411022,
  0.8937972330019297,
  0.92179958830193087,
  0.92382084119416874,
  0.91666987587106108,
  0.91435356586511229,
  0.93465770174729956,
  0.94301660686430333,
  0.93059465065994684,
  0.94519675388885616,
  0.93797933540238831,
  0.94038956864992262,
  0.92494139795235319,
  0.9666637666753668,
  0.81115635812270892,
  0.84199877100050347,
  0.86822707669099408,
  0.88223021110943012,
  0.90590227007862467,
  0.89420717535567373,
  0.89304855219863588],
 [0.91402324545588598,
  0.91116819588542008,
  0.93523011312852355,
  0.92989365273335312,
  0.89936153726791668,
  0.88896945306877684,
  0.94103693588866988,
  0.94322765513505735,
  0.93110817582553607,
  0.94231364376830795,
  0.93366932387848012,
  0.93204819659361859,
  0.9387840306122065,
  0.88490742977420023,
  0.9666637666753668,
  0.88834196025373524,
  0.91757061454154976,
  0.91616675909273682,
  0.92913962965373142,
  0.91513182689386197,
  0.9387444450353416,
  0.88753969443787839,
  0.90667243833597988,
  0.93883001611586947,
  0.9317517559970403,
  0.95627875616938696,
  0.81660696160563695,
  0.87019336631460231,
  0.88442316657786779,
  0.88888888320336634],
 [0.90452711271185948,
  0.90033332242759601,
  0.93021167952120198,
  0.94144038484943426,
  0.91739531212129599,
  0.94727788156744841,
  0.93520864339799248,
  0.93206046561281641,
  0.94379386026338308,
  0.93371910717630213,
  0.93812275019373648,
  0.94008500059814171,
  0.9666637666753668,
  0.84651008917567971,
  0.95003889455780477,
  0.90035952167935618,
  0.93643544982322724,
  0.93225143131874821,
  0.86132474413815208,
  0.91316917886963023,
  0.92198517590002305,
  0.94384260360457473,
  0.913637014968531,
  0.89364674530674104,
  0.85560382247907252,
  0.89135487705464589,
  0.89314686865318249,
  0.90002643042628128,
  0.89591578957189255,
  0.91253316239326676]]

In [ ]:
# Plot firing rate matrix
fig, axes = plt.subplots(1,3, figsize=(15,8))
lambda_kws = dict(text_kws=text_kws, cmap=plt.cm.seismic, norm=colors.PowerNorm(0.5))
lambda_order = np.argsort(run_hmms[0].hmm.means.sum(axis=0))
plot_lambda(axes[0], hmm=run_hmms[0], title=run_hmms[0].label, cbar=False, lo=lambda_order, **lambda_kws)
plot_lambda(axes[1], hmm=run_hmms[1], title=run_hmms[1].label, ylabel=False, lo=lambda_order, cbar=False, **lambda_kws)
plot_lambda(axes[2], hmm=run_hmms[2], title=run_hmms[2].label, ylabel=False, lo=lambda_order, cbar=True, cb_ticks=[0.1, 4, 14], **lambda_kws)
fig.tight_layout(h_pad=.5, w_pad=0.75, rect=[0, .05, 1, 1])

Analyze sparsity of PBE model


In [69]:
# get spike train
st = exp_data[session_time]['spikes']
# restrict spikes to only PBEs:
mua_spks = st[aux_data[session_time][segment]['PBEs'].support]

random_state = 1
test_size = 0.2
description = (session_time, segment)
verbose = False

hmm_actual = HMMSurrogate(kind='actual', 
                          st=mua_spks, 
                          num_states=num_states, 
                          ds=ds, 
                          test_size=test_size, 
                          random_state=random_state, 
                          description=description,
                          verbose=verbose)

hmm_coherent = HMMSurrogate(kind='coherent', 
                                       st=mua_spks, 
                                       num_states=num_states, 
                                       ds=ds, 
                                       test_size=test_size, 
                                       random_state=random_state, 
                                       description=description,
                                       verbose=verbose)

hmm_poisson = HMMSurrogate(kind='poisson', 
                                       st=mua_spks, 
                                       num_states=num_states, 
                                       ds=ds, 
                                       test_size=test_size, 
                                       random_state=random_state, 
                                       description=description,
                                       verbose=verbose)

pbe_hmms = [hmm_actual,
        hmm_coherent,
        hmm_poisson]

In [81]:
n_shuffles = 50

for nn in range(n_shuffles):
    print('starting {}'.format(nn))
    for hmm in pbe_hmms:
        print("shuffling", hmm.label)
        hmm.shuffle()
        print("fitting", hmm.label)
        hmm.fit()
        print("scoring", hmm.label)
        
        # calculate and aggregate various gini coefficients
        hmm.score_gini(kind='tmat')
        hmm.score_gini(kind='lambda')
        hmm.score_gini(kind='tmat_arrival')
        hmm.score_gini(kind='tmat_departure')
        hmm.score_gini(kind='lambda_across_states')
        hmm.score_gini(kind='lambda_across_units')
        
        # calculate and aggregate bottleneck_ratios
        hmm.score_bottleneck_ratio(n_samples=20000)
        
    print('completed {}'.format(nn))


starting 0
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 0
starting 1
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 1
starting 2
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 2
starting 3
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 3
starting 4
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 4
starting 5
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 6
starting 7
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 7
starting 8
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 8
starting 9
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 9
starting 10
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 10
starting 11
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 11
starting 12
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 12
starting 13
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 13
starting 14
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 14
starting 15
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 15
starting 16
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 16
starting 17
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 17
starting 18
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 18
starting 19
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 19
starting 20
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 20
starting 21
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 21
starting 22
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 22
starting 23
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 23
starting 24
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 24
starting 25
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 25
starting 26
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 26
starting 27
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 28
starting 29
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 29
starting 30
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 30
starting 31
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 31
starting 32
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 32
starting 33
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 33
starting 34
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 34
starting 35
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 35
starting 36
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 36
starting 37
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 37
starting 38
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 39
starting 40
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 40
starting 41
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 41
starting 42
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 42
starting 43
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 43
starting 44
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 44
starting 45
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 45
starting 46
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 46
starting 47
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 47
starting 48
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 48
starting 49
shuffling actual
fitting actual
scoring actual
shuffling coherent
fitting coherent
scoring coherent
shuffling poisson
fitting poisson
scoring poisson
completed 49

In [72]:
## define figure parameters and color pallete
text_kws = dict(ha="center", size=7)
fig_kws = dict(text_kws=text_kws, cmap=plt.cm.seismic)

fig, axes = plt.subplots(1,3, figsize=(15, 12))
plot_transmat(axes[0], fig, hmm=pbe_hmms[0], title=pbe_hmms[0].label, cbar=False, **fig_kws)
plot_transmat(axes[1], fig, hmm=pbe_hmms[1], title=pbe_hmms[1].label, cbar=False, ylabel=False, **fig_kws)
plot_transmat(axes[2], fig, hmm=pbe_hmms[2], title=pbe_hmms[2].label, cbar=True, ylabel=False, **fig_kws)
fig.tight_layout(h_pad=.5, w_pad=0.75, rect=[0, .05, 1, 1])



In [ ]:
# Plot sun-graph representation of transition matrix
fig, axes = plt.subplots(2,3, figsize=(15, 12))
plot_transmat(axes[0,0], fig, hmm=pbe_hmms[0], title=pbe_hmms[0].label, cbar=False, **fig_kws)
plot_transmat(axes[0,1], fig, hmm=pbe_hmms[1], title=pbe_hmms[1].label, cbar=False, ylabel=False, **fig_kws)
plot_transmat(axes[0,2], fig, hmm=pbe_hmms[2], title=pbe_hmms[2].label, cbar=True, ylabel=False, **fig_kws)

plot_sun_graph(axes[1,0], hmm=pbe_hmms[0], nc=npl.colors.sweet.green, **fig_kws)
plot_sun_graph(axes[1,1], hmm=pbe_hmms[1], nc=npl.colors.sweet.red, **fig_kws)
plot_sun_graph(axes[1,2], hmm=pbe_hmms[2], nc=npl.colors.sweet.red, **fig_kws)

In [75]:
# Plot firing rate matrix
fig, axes = plt.subplots(1,3, figsize=(15,8))
lambda_kws = dict(text_kws=text_kws, cmap=plt.cm.seismic, norm=colors.PowerNorm(0.5))
lambda_order = np.argsort(run_hmms[0].hmm.means.sum(axis=0))
plot_lambda(axes[0], fig, hmm=pbe_hmms[0], title=pbe_hmms[0].label, cbar=False, lo=lambda_order, **lambda_kws)
plot_lambda(axes[1], fig, hmm=pbe_hmms[1], title=pbe_hmms[1].label, ylabel=False, lo=lambda_order, cbar=False, **lambda_kws)
plot_lambda(axes[2], fig, hmm=pbe_hmms[2], title=pbe_hmms[2].label, ylabel=False, lo=lambda_order, cbar=True, 
            cb_ticks=[0.1, 4, 14], **lambda_kws)
fig.tight_layout(h_pad=.5, w_pad=0.75, rect=[0, .05, 1, 1])



In [82]:
from model_plotting import plot_transmat_gini_departure, plot_transmat_gini_arrival, plot_bottleneck, plot_lambda_gini_across_states
# cm = plt.get_cmap('Spectral_r')
#clist = [cm(1.*i/NUM_COLORS) for i in range(NUM_COLORS)]
#clist = np.roll(clist, 0, axis=0)
npl.set_palette(sns.color_palette("hls", 8))

fig, axes = plt.subplots(2,1, figsize=(6,12))
plot_transmat_gini_departure(axes[0], pbe_hmms, **fig_kws)
#plot_transmat_gini_arrival(axes[1], run_hmms, **fig_kws)
plot_lambda_gini_across_states(axes[1], pbe_hmms, **fig_kws)
# # plot_gini_lambda(axes[7], [hmms[0], hmms[2], hmms[3]], **fig_kws)
# plot_bottleneck(axes[2], run_hmms, **fig_kws)

fig.tight_layout(h_pad=5, w_pad=0.75, rect=[0, .05, 1, 1])



In [ ]:

Compute virtual tuning curves...


In [ ]:
# OK - let's think about what we want to do:

# Big question - what is the latent space that describes hippocampal activity?
#  (1) - what does that latent space look like?
#      - transition matrix and firing rate matrix
#      - sparsity, compared with shuffles?
#      - cross-validated virtual tuning curves
#  (2) - we can learn models on both place cell activity and PBEs
#      - are they equivalent?
#       : latent space looks qualitatively similar
#      - how do they differ?
#       : cross-validated likelihood (goodness-of-fit) is more different than shuffles?
#       : is there something to be said about scoring? maybe PBE-in-place cell better than
#          place cell in PBE
#  (3) - can we see replay?


# (0) replicate cross-modal scoring
#    - cross-validated self scoring (train model on subsets, test on the rest)
#    - cross-modal scoring (train model on whole set)
#    - have to deal with sequence length, but can compare by sequence
# 
# (1) cross-validation training curves comparing to shuffles?
#    - this could be the way Kamran suggested (just shuffling the test set)
#    - this could also be the way Etienne suggested (shuffling all the data, then training as usual)
#
# (2) generate sparsity data for transition and rate matrices
#
# (3) Is there a way to think about mutual information??? I think it would be hard, because I think 
#     the operant question would be MI(spikes | position) and MI(spikes | latent state)

Calculate virtual tuning curves for RUN HMM and compare with PBE


In [ ]:
# session_time, segment = ('16-40-19', 'short') # example session

num_states = 30 # number of states for PBE HMM
min_tc_duration = 0 # mininmum observation time in seconds, before a bin contributes to the tuning curve
sigma_tc = 4 # 4 cm smoothing on tuning curves

description = (session_time, segment)
print("session: {}".format(description))

s = np.argwhere([segment == segment_label for segment_label in df[df.time==session_time]['segment_labels'].values.tolist()[0]])
st_run = exp_data[session_time]['spikes'][s][exp_data[session_time]['run_epochs']]

# smooth and re-bin:
sigma = 0.3 # 300 ms spike smoothing
bst_run = st_run.bin(ds=ds_50ms).smooth(sigma=sigma, inplace=True).rebin(w=ds_run/ds_50ms)
bst = bst_run


pos = exp_data[session_time]['pos1d'] # should this be pos1d?

ext_nx=124
x0=0; xl=310;

xx_left = np.linspace(x0,xl,ext_nx+1)
xx_mid = np.linspace(x0,xl,ext_nx+1)[:-1]; xx_mid += (xx_mid[1]-xx_mid[0])/2

#########################################################
# Generate an HMM trained on all PBEs 
PBEs = aux_data[session_time][segment]['PBEs']
pbe_hmm = nel.hmmutils.PoissonHMM(n_components=num_states, random_state=0, verbose=False)
pbe_hmm.fit(PBEs)
transmat_order = pbe_hmm.get_state_order('transmat')
pbe_hmm.reorder_states(transmat_order)

xpos = pos.asarray(at=bst_run.centers).yvals

ext_x = np.digitize(xpos, xx_left) - 1 # spatial bin numbers
ext_x = ext_x.astype(float)
ext_x[ext_x==0] = np.nan
ext_x[ext_x>=ext_nx] = np.nan

extern = pbe_hmm.fit_ext(X=bst_run, ext=ext_x, n_extern=ext_nx)

pbe_vtc = nel.TuningCurve1D(ratemap=extern, min_duration=min_tc_duration, extmin=x0, extmax=xl)
pbe_vtc = pbe_vtc.smooth(sigma=sigma_tc)
pbe_vtc.reorder_units(inplace=True)
#########################################################

k_folds = 3
vtcs_run = []
X = list(range(bst_run.n_epochs))

for kk, (training, validation) in enumerate(k_fold_cross_validation(X, k=k_folds)):     
    print('  fold {}/{}'.format(kk+1, k_folds))

    RunSeqs_train = bst[training]
    RunSeqs_test = bst[validation]

    # train HMM on all training PBEs
    hmm = nel.hmmutils.PoissonHMM(n_components=num_states, random_state=0, verbose=False)
    hmm.fit(RunSeqs_train)

    # reorder states according to transmat ordering
    transmat_order = hmm.get_state_order('transmat')
    hmm.reorder_states(transmat_order)

    # compute spatial info on non-shuffled data:
    xpos = pos.asarray(at=RunSeqs_test.centers).yvals

    ext_x = np.digitize(xpos, xx_left) - 1 # spatial bin numbers
    ext_x = ext_x.astype(float)
    ext_x[ext_x==0] = np.nan
    ext_x[ext_x>=ext_nx] = np.nan

    extern = hmm.fit_ext(X=RunSeqs_test, ext=ext_x, n_extern=ext_nx)

    vtc = nel.TuningCurve1D(ratemap=extern, min_duration=min_tc_duration, extmin=x0, extmax=xl)
    vtc = vtc.smooth(sigma=sigma_tc)
    
    vtc.reorder_units(inplace=True)
    
    vtcs_run.append(vtc)

In [ ]:
NUM_COLORS = vtc.n_units + 2

cm = plt.get_cmap('viridis')
clist = [cm(1.*i/NUM_COLORS) for i in range(NUM_COLORS)]

npl.set_palette(clist)

for vtc in vtcs_run:
    fig, axs = plt.subplots(1,2,figsize=(12,6))
    npl.plot_tuning_curves1D(vtc, pad=0.1, ax=axs[0])
    npl.plot_tuning_curves1D(pbe_vtc, pad=0.1, ax=axs[1])
    plt.show()

In [ ]:


In [ ]:
# set criteria for units used in decoding
min_peakfiringrate = 1 # Hz
max_avgfiringrate = 5 # Hz
peak_to_mean_ratio_threshold = 0 # peak firing rate should be greater than 3.5 times mean firing rate

# unimodal_cells = find_unimodal_tuningcurves1D(smoothed_rate, peakthresh=0.5)

# enforce minimum peak firing rate
unit_ids_to_keep = set(np.asanyarray(tc.unit_ids)[np.argwhere(tc.ratemap.max(axis=1)>min_peakfiringrate).squeeze().tolist()])
# enforce maximum average firing rate
unit_ids_to_keep = unit_ids_to_keep.intersection(set( np.asanyarray(tc.unit_ids)[np.argwhere(tc.ratemap.mean(axis=1)<max_avgfiringrate).squeeze().tolist()]   ))

# enforce peak to mean firing ratio
peak_firing_rates = tc.max(axis=1)
mean_firing_rates = tc.mean(axis=1)
ratio = peak_firing_rates/mean_firing_rates
unit_ids_to_keep = unit_ids_to_keep.intersection(set(np.asanyarray(tc.unit_ids)[np.argwhere(ratio>=peak_to_mean_ratio_threshold).squeeze().tolist()]))

# finally, convert remaining units into a list of indices
unit_ids_to_keep = list(unit_ids_to_keep)

# modify spike trains and ratemap to only include those units that passed all the criteria
sta_placecells = exp_data[session_time]['spikes']._unit_subset(unit_ids_to_keep)

tc_placecells = tc._unit_subset(unit_ids_to_keep)

# reorder cells by peak firing location on track (this is nice for visualization, but doesn't affect decoding)
tc_placecells.reorder_units(inplace=True)

sta_placecells.reorder_units_by_ids(tc_placecells.unit_ids, inplace=True)

# with plt.xkcd():
with npl.palettes.color_palette(npl.colors.rainbow):
    with npl.FigureManager(show=True, nrows=1, ncols=3, figsize=(16,4)) as (fig, axes):
        npl.utils.skip_if_no_output(fig)
        ax0, ax1, ax2 = axes

        npl.plot_tuning_curves1D(tc_placecells.smooth(sigma=3), ax=ax0, pad=5.5);
        npl.plot_tuning_curves1D(tc_placecells.smooth(sigma=3), ax=ax1, normalize=True, pad=0.9);
        npl.plot_tuning_curves1D(tc_placecells.smooth(sigma=3), ax=ax2, pad=0);

        for ax in axes:
            ax.set_xlabel('position [cm]')
        npl.utils.xticks_interval(25, *axes)
        npl.utils.yticks_interval(5, ax2)
        npl.add_simple_scalebar("10 Hz", ax=ax0, xy=(10, 57), length=10, orientation='v', rotation_text='h', size=14)
#         npl.add_simple_scalebar("5 Hz", ax=ax1, xy=(10, 17.5), length=5, orientation='v', rotation_text='h', size=14)
        ax0.set_title('True firing rates', size=12)
        ax1.set_title('Normalized firing rates', size=12)
        ax2.set_title('Collapsed units (pad=0)', size=12)